package br.com.fafica.sisape.view;

import java.awt.BorderLayout;
import java.awt.EventQueue;

import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.border.EmptyBorder;
import java.awt.Color;
import javax.swing.JLabel;
import javax.swing.ImageIcon;

import br.com.fafica.sisape.control.ControllerUsuario;
import br.com.fafica.sisape.model.Paciente;

import java.awt.Font;
import java.awt.TextArea;

public class TelaMedicoHistoricoCompleto extends JFrame {

	private JPanel contentPane;
	public static Paciente verHistorico;

	/**
	 * Launch the application.
	 */
	public static void main(String[] args) {
		EventQueue.invokeLater(new Runnable() {
			public void run() {
				try {
					TelaMedicoHistoricoCompleto frame = new TelaMedicoHistoricoCompleto();
					frame.setVisible(true);
				} catch (Exception e) {
					e.printStackTrace();
				}
			}
		});
	}

	/**
	 * Create the frame.
	 */
	public TelaMedicoHistoricoCompleto() {
		setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
		setBounds(100, 100, 738, 640);
		contentPane = new JPanel();
		contentPane.setBackground(new Color(255, 255, 255));
		contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
		setContentPane(contentPane);
		contentPane.setLayout(null);
		
		JLabel label = new JLabel("");
		label.setIcon(new ImageIcon("arquivos\\telaHistorico.png"));
		label.setBounds(71, 11, 569, 138);
		contentPane.add(label);
		
		JLabel lblNome = new JLabel("Nome:");
		lblNome.setForeground(new Color(0, 0, 128));
		lblNome.setFont(new Font("Tahoma", Font.PLAIN, 14));
		lblNome.setBounds(71, 172, 46, 17);
		contentPane.add(lblNome);
		
		JLabel lblCpf = new JLabel("Cpf:");
		lblCpf.setForeground(new Color(0, 0, 128));
		lblCpf.setFont(new Font("Tahoma", Font.PLAIN, 14));
		lblCpf.setBounds(71, 200, 46, 17);
		contentPane.add(lblCpf);
		
		JLabel lblTxtnome = new JLabel("txtNome");
		lblTxtnome.setForeground(new Color(0, 0, 128));
		lblTxtnome.setFont(new Font("Tahoma", Font.PLAIN, 14));
		lblTxtnome.setBounds(127, 172, 284, 17);
		contentPane.add(lblTxtnome);
		lblTxtnome.setText(verHistorico.getNome());
		
		JLabel lblTxtcpf = new JLabel("txtCpf");
		lblTxtcpf.setForeground(new Color(0, 0, 128));
		lblTxtcpf.setFont(new Font("Tahoma", Font.PLAIN, 14));
		lblTxtcpf.setBounds(127, 200, 284, 17);
		contentPane.add(lblTxtcpf);
		lblTxtcpf.setText(verHistorico.getCpf());
		
		TextArea textArea = new TextArea();
		textArea.setBounds(73, 233, 567, 358);
		contentPane.add(textArea);
		ControllerUsuario control = new ControllerUsuario();
		textArea.setText(control.carregaHistorico(verHistorico.getCod()));
	}

}
